<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <title>短链接|免费短链接生成网站</title>
        <meta name="keywords" content="短链接,短网址,免费短链接,缩短网址,网址压缩,短域名,短地址,短URL,免费短链接,缩短网址,短链接生成,免费缩址,域名伪装,域名转向,长网址变短网址">
        <meta name="description" content="免费的短链接服务,在线生成短网址,开放API接口,可批量生成短链接,不限制接口请求数,跳转快,稳定可靠,防屏蔽,防拦截!">
        <meta name="renderer" content="webkit" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
        <link rel="stylesheet" href="/static/layui/css/layui.css"  media="all" />
        <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
        <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
        <!--[if lt IE 9]>
            <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
            <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
        <![endif]-->          
        <script src="/static/layui/layui.js"></script>
        <script src="/static/jquery.min.js"></script>
    </head>
    <body>
        <div class="layui-container">
            <ul class="layui-nav" lay-filter="" id="navs">
                <li class="layui-nav-item"><a href="/index.html">网站首页</a></li>
                <li class="layui-nav-item" style="display: none" id="nav_center"><a href="/user.html">会员中心</a></li>
                <li class="layui-nav-item" id="nav_login"><a href="/login.html">登录系统</a></li>
                <li class="layui-nav-item" id="nav_register"><a href="/register.html">注册用户</a></li>
                <li class="layui-nav-item" id="nav_help"><a href="/help.html">使用说明</a></li>
            </ul>
<script type="text/javascript">
layui.HOST_NAME = "http://127.0.0.1:8091";
layui.get_token = function() { 

};
function get_api_url(url) { 
    return "http://127.0.0.1:8091/v1/" + url;
}
function has_login() { 
    var auth_string = window.localStorage.getItem("authorization");
    return auth_string && auth_string !== "";
}

layui.use('jquery', function() { 
    var $ = jQuery;
    var path = location.pathname;
    var navs = $("#navs");
    if (path.indexOf("user-") > 0) { 
        $("a:eq(1)", navs).addClass("layui-this");
    } else if (path == "" || path == "/") { 
        $("a:first", navs).addClass("layui-this");
    } else { 
        $("a", navs).each(function() { 
            var that = $(this);
            var url = that.attr("href");
            if (url === path) { 
                that.addClass("layui-this");
                return;
            }
        });
    }

    var nav_center = $("#nav_center"), nav_login = $("#nav_login"), nav_register = $("#nav_register");
    //var auth_string = window.localStorage.getItem("authorization");
    if (!has_login()) {  //}!auth_string || auth_string === "") { 
        nav_center.hide();
        nav_login.show();
        nav_register.show();
    } else {
        nav_center.show();
        nav_login.hide();
        nav_register.hide();
    }
});
//layui.use('element', function(){
//    var element = layui.element; //导航的hover效果、二级菜单等功能，需要依赖element模块
//    //监听导航点击
//    element.on('nav(demo)', function(elem){
//        //console.log(elem)
//        layer.msg(elem.text());
//    });
//});
</script>
<!-- 网页主体-开始 -->
